import { AxiosInstance } from 'axios';
import createAxios from './index';
import { getApiBase } from './config';

export function getAxiosInstance(name: string | undefined): AxiosInstance {
  return createAxios({
    baseURL: getApiBase()[name || 'base'] || getApiBase()['base'],
  });
};